<%-- 
    Document   : index
    Created on : 10/04/2012, 03:27:46 PM
    Author     : Oscar
--%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.Vector, com.coneccion.*, java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>Listado de locales</title>
        <link rel="stylesheet" type="text/css" href="../css/css.css">
    </head>
    <body>
        <div style="background-color:#ECF2F7; width:720px">
<h2><img src="../css/img/listado.png" width="24" height="24"> Listado de locales</h2>
 <%

Vector<String[]> local = sql.consulta("SELECT local.codlocal,local.nombre, local.direccion, local.telefono FROM local ");
out.println("<br><table border=4 cellpadding='0' cellspacing='0'  wIdgeneth='90%'>");
out.println("<tr bgcolor='#ACCBEA'>");
out.println("<th>Codigo</th>");
out.println("<th>Nombre</th>");
out.println("<th>Direccion</th>");
out.println("<th>Telefono</th>");
out.println("</tr>");

boolean color = true;
for(int fils=1; fils<local.size(); ++fils) {
	out.println("<tr bgcolor=" + (color ? "#EEF7FF" : "#F7FBFF") + ">");

String[] unaFila= (String[]) local.get(fils);
out.println("<td>" + unaFila[0] + "</a></td>");
out.println("<td>" + unaFila[1] + "</td>");
out.println("<td>" + unaFila[2] + "</td>");
out.println("<td>" + unaFila[3]+ "</td>");
out.println("</tr>");
color = !color;
   }

out.println("</table>");

%>
<br>
<table>
  <tr>
    <td><a href="../index.jsp"><samp>-- Regresar</samp></a></td>
  </tr>
</table>
</div>
</body>
    </body>
</html>
